package Chess;

import Run.BishopStrategy;
import Run.KingStrategy;
import Run.KnightStrategy;
import Run.QueenStrategy;
import Run.RookStrategy;
import Run.blackPawnStrategy;
import Run.whitePawnStrategy;

public class whiteChessback {
	public void whitechessback(int x,int y,chessPiece nextPiece){
		if(nextPiece.getChessType()==chessType.whitePawn){
			 chessPiece piece2 = new chessPiece(x,y, chessType.whitePawn,new whitePawnStrategy());
	         BorderPane.getWhiteChessList().add(piece2);
	         BorderPane.reshapeImageView(x,y,piece2);
	         Main.pane.getChildren().addAll(piece2.getImageView());
		}
		else if(nextPiece.getChessType()==chessType.whiteRook){
			chessPiece piece2 = new chessPiece(x,y, chessType.whiteRook,new RookStrategy());
	         BorderPane.getWhiteChessList().add(piece2);
	         BorderPane.reshapeImageView(x,y,piece2);
	         Main.pane.getChildren().addAll(piece2.getImageView());
		}
		else if(nextPiece.getChessType()==chessType.whiteKnight){
			 chessPiece piece2 = new chessPiece(x,y, chessType.whiteKnight,new KnightStrategy());
	         BorderPane.getWhiteChessList().add(piece2);
	         BorderPane.reshapeImageView(x,y,piece2);
	         Main.pane.getChildren().addAll(piece2.getImageView());
		}
		else if(nextPiece.getChessType()==chessType.whiteBishop){
			chessPiece piece2 = new chessPiece(x,y, chessType.whiteBishop,new BishopStrategy());
	         BorderPane.getWhiteChessList().add(piece2);
	         BorderPane.reshapeImageView(x,y,piece2);
	         Main.pane.getChildren().addAll(piece2.getImageView());
		}
		else if(nextPiece.getChessType()==chessType.whiteQueen){
			 chessPiece piece2 = new chessPiece(x,y, chessType.whiteQueen,new QueenStrategy());
	         BorderPane.getWhiteChessList().add(piece2);
	         BorderPane.reshapeImageView(x,y,piece2);
	         Main.pane.getChildren().addAll(piece2.getImageView());
		}
		else if(nextPiece.getChessType()==chessType.whiteKing){
			 chessPiece piece2 = new chessPiece(x,y, chessType.whiteKing,new KingStrategy());
	         BorderPane.getWhiteChessList().add(piece2);
	         BorderPane.reshapeImageView(x,y,piece2);
	         Main.pane.getChildren().addAll(piece2.getImageView());
		}
	}
}
